import { autois } from "./autois";
import { flaretimer } from "./flaretimer";
import { withercloak } from "./withercloak";
import { quickcommandInit } from "./quickcommand";
import { slayer } from "./slayer";
import { BZANote } from "./note";
import { misc } from "./misc";
import { mining } from "./mining";
import { garden } from "./garden";
import { loadWings } from "./wings";
import { fishing } from "./fishing";
import { skywarsFeatures } from "./skywars";
import playCMD from "./playCMD";
import { location } from "../utils/getLocation";
import { loadGreatSpook } from "./greatspook";
import heavypearls from "./heavypearls";
import popupEvents from "./popupEvents";
import quivermanager from "./quivermanager";

export function loadfeatures() {
    flaretimer();
    withercloak();
    autois();
    quickcommandInit();
    slayer();
    mining();
    misc.load();
    BZANote.firstshow();
    garden();
    fishing();
    skywarsFeatures();
    loadWings();
    loadGreatSpook();

    //  /play 指令
    const PlayCMDTrigger = register("command", (...args) => {
        if(playCMD.TogglePlayCMD && args[0] == null && location.server != "") playCMD.openGUI();
        else ChatLib.command("play " + args.join(" "));
    }).setName("play");
    register("step", () => {
        if(playCMD.TogglePlayCMD) PlayCMDTrigger.register(); else PlayCMDTrigger.unregister();
    }).setDelay(30)
}